<?php
include($_SERVER['DOCUMENT_ROOT']."/ObstacleWebApp/model/config.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Obstacle - Control Panel</title>
<link rel="icon" type="image/ico" href="<?php echo $cfg['basepath']."images/favicon.ico"; ?> "/>

<link rel="stylesheet" href="<?php echo $cfg['basepath']."styles/stylemain.css"; ?> "/>
<link rel="stylesheet" href="<?php echo $cfg['basepath']."styles/onoffswitchgeslacht.css"; ?> "/>
<link rel="stylesheet" href="<?php echo $cfg['basepath']."styles/onoffswitchactivatie.css"; ?> "/>
<link rel="stylesheet" href="<?php echo $cfg['basepath']."styles/jquery-ui.css"; ?> " />
<link rel="stylesheet" href="<?php echo $cfg['basepath']."styles/jquery.rating.css"; ?> " />
<script src="<?php echo $cfg['basepath']."javascripts/modernizr-1.6.min.js"; ?>"></script>
<script src="<?php echo $cfg['basepath']."javascripts/calendar.js"; ?>"></script>
<script src="<?php echo $cfg['basepath']."javascripts/jquery-1.8.js"; ?>"></script>
<script src="<?php echo $cfg['basepath']."javascripts/jquery-ui.js"; ?>"></script>
<script src="<?php echo $cfg['basepath']."javascripts/jquery.MetaData.js"; ?>"></script>
<script src="<?php echo $cfg['basepath']."javascripts/jquery.rating.js"; ?>"></script>
<script src="<?php echo $cfg['basepath']."javascripts/jquery.form.js"; ?>"></script>
<script src="<?php echo $cfg['basepath']."javascripts/jquery.rating.pack.js"; ?>"></script>

<style>

#passwordStrength
{
	height:10px;
	display:block;
	float:left;
}

.strength0
{
	width:150px;
	background:#cccccc;
}

.strength1
{
	width:30px;
	background:#ff0000;
}

.strength2
{
	width:60px;	
	background:#ff5f5f;
}

.strength3
{
	width:90px;
	background:#56e500;
}

.strength4
{
	background:#4dcd00;
	width:120px;
}

.strength5
{
	background:#399800;
	width:150px;
}


</style>

</head>

<body>
<div id="container">

<header>

<h2>Screeningsinstrument met bijhorende databanken<br>In samenwerking met <a href=\"http://www.phl.be\" target=\"_blank\">PHL</a> en <a href=\"http://www.woonlabo.be/\" target=\"_blank\">UD Woonlabo</a></h2>

<h1><a href=" <?php echo $cfg['basepath']."index.php" ?> ">Obstacle</a></h1>

</header>

<?php
	require_once('view/menu.php');
?>

<article>

<?php
	require_once('view/login.php');
?>

<?php


//echo "INSERT INTO 'CITY' ('Id', 'City', 'ZIP') VALUES <br>";
//$query = "SELECT * FROM gemeente";
//$result = mysql_query($query) or die (mysql_error());
//while ($row = mysql_fetch_array($result))
//{
//    echo "(".$row['id'].", '".$row['naam']."', '".$row['postcode']."'),<br>";
//}












// MYSQL

//print '<h3>MYSQL: calling sp with out variables</h3>';
//$rs = mysql_query("CALL GetAllBuildingsCount(@number)") or die (mysql_error());
//$rs = mysql_query("SELECT @number");
//while($row = mysql_fetch_assoc($rs))
//{
//    echo $row['@number'];
//}
//
//
//$mysql = mysql_connect('localhost', 'root', '');
//mysql_select_db('obstacle_db', $mysql);
//
//print '<h3>MYSQL: calling sp returning a recordset – doesn\'t work</h3>';
//$rs2 = mysql_query("CALL GetAllBuildingsLimit(0, 3)");
//while($row2 = mysql_fetch_assoc($rs2))
//{
//debug($row2);
//}
//
//function debug($o)
//{
//print '<pre>';
//print_r($o);
//print '</pre>';
//}











//$unescaped_string = "let's test this string to see if it works. And throw in some special chars aswell (like these: é à ç ê ï)";
//
//echo "<br><br><h3>Unescaped string</h3><br>";
//echo $unescaped_string;
//
//echo "<br><br><h3>mysql_real_escape_string</h3><br>";
//$mysqlrealescapestring = mysql_real_escape_string($unescaped_string);
//echo $mysqlrealescapestring;
//
//echo "<br><br><h3>htmlspecialchars</h3><br>";
//$htmlspecialchars = htmlspecialchars($unescaped_string);
//echo $htmlspecialchars;
//
//echo "<br><br><h3>first htmlspecialchars, then mysql_real_escape_string</h3><br>";
//$mysqlhtml = mysql_real_escape_string(htmlspecialchars($unescaped_string));
//echo $mysqlhtml;
//
//echo "<br><br><h3>first mysql_real_escape_string, then htmlspecialchars</h3><br>";
//$htmlmysql = htmlspecialchars(mysql_real_escape_string($unescaped_string));
//echo $htmlmysql;
//echo "<br><br><br>";
//$query1 = "INSERT INTO TEST (Name, Value) Values ('Unescaped string', '$mysqlrealescapestring')";
//$result1 = mysql_query($query1) or die (mysql_error());
//if ($result1)
//{
//    echo "Unescaped string inserted succesfully <br>";
//}
//
//$query2 = "INSERT INTO TEST (Name, Value) Values ('mysql_real_escape_string', '$mysqlrealescapestring')";
//$result2 = mysql_query($query2);
//if ($result2)
//{
//    echo "mysql_real_escape_string inserted succesfully <br>";
//}
//
//$query3 = "INSERT INTO TEST (Name, Value) Values ('htmlspecialchars', '$htmlspecialchars')";
//$result3 = mysql_query($query3) or die (mysql_error());
//if ($result3)
//{
//    echo "htmlspecialchars inserted succesfully <br>";
//}
//
//$query4 = "INSERT INTO TEST (Name, Value) Values ('first htmlspecialchars, then mysql_real_escape_string', '$mysqlhtml')";
//$result4 = mysql_query($query4);
//if ($result4)
//{
//    echo "first htmlspecialchars, then mysql_real_escape_string inserted succesfully <br>";
//}
//
//$query5 = "INSERT INTO TEST (Name, Value) Values ('first mysql_real_escape_string, then htmlspecialchars', '$htmlmysql')";
//$result5 = mysql_query($query5);
//if ($result5)
//{
//    echo "first mysql_real_escape_string, then htmlspecialchars inserted succesfully <br>";
//}
//$htmlentmysql = htmlentities(mysql_real_escape_string($unescaped_string));
//$query5 = "INSERT INTO TEST (Name, Value) Values ('first mysql_real_escape_string, then htmlentities', '$htmlentmysql')";
//$result5 = mysql_query($query5);
//if ($result5)
//{
//    echo "first mysql_real_escape_string, then htmlentities inserted succesfully <br>";
//}

//echo "<h1>From database</h1>";
//$query = "SELECT * FROM test";
//$result = mysql_query($query);
//while ($row = mysql_fetch_array($result))
//{
//    echo "<h3>".$row['Name']."</h3>";
//    echo $row['Value'];
//}


?>

    <?php
$connection->closeConnection();
?>
</article>
<footer>

<h1>&copy; Copyright 2012 Obstacle</h1>

<h2>
Design by <a href="http://www.designity.org/">Free Web Design Community</a>
</h2>

</footer>

</div>
</body>

</html>